package com.guigu.wenzhiyi.controller;

import com.github.pagehelper.PageInfo;
import com.guigu.tankai.pojo.Member;
import com.guigu.tankai.pojo.Memberexamination;
import com.guigu.tankai.pojo.Membermedicalhistory;
import com.guigu.wenzhiyi.pojo.Bodytype;
import com.guigu.wenzhiyi.pojo.Interposeclassify;
import com.guigu.wenzhiyi.pojo.Mentalityresult;
import com.guigu.wenzhiyi.service.InterposeclassifyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("Interposeclassify")
public class InterposeclassifyController {

    @Autowired
    InterposeclassifyService interposeclassifyService;

    @RequestMapping("/page")
    public PageInfo<Member> page(Integer num, Integer size, String name) {
        return interposeclassifyService.page(num, size, name);
    }

    @RequestMapping("/MembermedicalhistoryCha")
    public Membermedicalhistory MembermedicalhistoryCha(String id) {
        Membermedicalhistory memberaddcha = interposeclassifyService.Memberaddcha(id);
        return memberaddcha;
    }

    @RequestMapping("/BodytypeCha")
    public List<Bodytype> BodytypeCha(String id) {
        return interposeclassifyService.Bodytypeaddcha(id);
    }

    @RequestMapping("/MentalityresultCha")
    public List<Mentalityresult> MentalityresultCha(String id) {
        return interposeclassifyService.Mentalityresultaddcha(id);
    }

    @RequestMapping("/add")
    public int add(@RequestBody Interposeclassify interposeclassify) {
        return interposeclassifyService.add(interposeclassify);
    }

    @RequestMapping("/tijian")
    public List<Memberexamination> tijian(String name) {
        return interposeclassifyService.tijian(name);
    }


}
